package com.sdleyou.treepro.common.rabbitmq.consumer;

import com.sdleyou.treepro.common.model.dao.BroadcastDO;
import com.sdleyou.treepro.common.rabbitmq.event.BroadcastMsgEvent;
import com.sdleyou.treepro.common.service.BroadcastManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 广播消费者
 */
@Component
public class BroadcastMsgConsumer implements BroadcastMsgEvent {

    @Autowired
    private BroadcastManager broadcastManager;

    @Override
    public void recordBroadcast(BroadcastDO broadcastDO) {
        broadcastManager.createBroadcast(broadcastDO);
    }
}
